﻿using ACC.Business;
using ACC.Data;
using ACC.Data.ACCLog;
using ACC.Data.Comm;
using ACC.Data.Line;
using ACC.Device;
using ACC.Device.Client;
using ACC.Device.Common;
using ACC.Device.PLC;
using ACC.Interface.Extensions;
using ACC.LineDevice.KukaPack;
using System;
using System.Collections.Generic;
using System.Linq;
using System.Text;

namespace Script
{
    /// <summary>
    /// 模拟有人工客户端站
    /// </summary>
    public class Stn20 : StnProcessKukaClientWithPLC
    {
        public Stn20(StnRunningData data)
            : base(data)
        {
            PlcName = "PLC_20";
            _data.ProcessUnitIDWhenLoad = true;
        }

        protected override ACCDevice CreateDevice()
        {
            ACCDevice dev = base.CreateDevice();

            if (dev is ClientDevice && kukaSiemensDev != null)
            {
                kukaSiemensDev.DB190 = 800;
                kukaSiemensDev.DB190_Offset = 200;

                kukaSiemensDev.DB193 = 800;
                kukaSiemensDev.DB193_PLC_Offset = 234;
                kukaSiemensDev.DB193_ACC_Offset = 268;
            }

            return dev;
        }
    }
}
